<!DOCTYPE html>
<html>
    <head>
        <title>Crear Subcalles</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <?php echo link_tag('bootstrap/css/estilo.css') ?>
        <?php echo link_tag('bootstrap/css/bootstrap.min.css') ?>
        <?php echo link_tag('bootstrap/css/layout.css') ?>
    </head>

    <body>
        <fieldset>
            <div class="body" id="container">
                <section id="buttonGroups">
                    <div class="page-header">
                        <h1>Crear Zonas SIMERT</h1>
                    </div>
                    <div class="row">
                        <div class="span8">
                            <form class="form-horizontal" method="POST" action="/simertweb/coordenadas_calles/guardar">
                                <?php
                                foreach ($listacalles as $key) {
                                    if (!empty($key->nombreZona)) {
                                        $listaZonas[] = $key;
                                    }
                                }
                                foreach ($listacalles as $key) {
                                    if (!empty($key->nombre)) {
                                        $listaC[] = $key;
                                    }
                                }
                                ?>
                                  
                                <br><br><br>
                                <div class="control-group">
                                    <div class="controls">
                                        <?php echo form_error('zona'); ?>
                                        <label class="control-label"><b>Nombre de la Zona:</b></label>
                                        <select class="span3" name="zona" >
                                            <?php foreach ($listaZonas as $fila) { ?>
                                                <option <?php
                                            if ($fila->nombreZona == set_value('zona')) {
                                                echo 'selected';
                                            }
                                                ?>> <?php echo $fila->nombreZona; ?> </option>  
                                                <?php } ?> 
                                        </select> 
                                        <b class="warning" style="font-size: 20px">&nbsp;&nbsp;</b>
                                    </div>
                                </div>  

                                <div class="control-group">
                                    <div class="controls">
                                        <?php echo form_error('calle'); ?>
                                        <label class="control-label"><b>Calle Principal:</b></label>
                                        <select class="span3" name="calle">
                                            <?php foreach ($listaC as $fila) { ?>
                                                <option <?php
                                            if ($fila->nombre == set_value('calle')) {
                                                echo 'selected';
                                            }
                                                ?>><?php echo $fila->nombre; ?> </option>
                                                <?php } ?> 
                                        </select>
                                        <b class="warning" style="font-size: 20px">&nbsp;&nbsp;</b>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <div class="controls">
                                        <label class="control-label"><b>Entre:</b></label>
                                        <select class="span3" name="sec_1">
                                            <?php foreach ($listaC as $fila) { ?>
                                                <option <?php
                                            if ($fila->nombre == set_value('sec_1')) {
                                                echo 'selected';
                                            }
                                                ?>><?php echo $fila->nombre; ?> </option>
                                                <?php } ?> 
                                        </select> 
                                        <b class="warning" style="font-size: 20px">&nbsp;&nbsp;</b>
                                    </div>
                                </div>  
                                <a href="https://maps.google.com.ec/" target="_blank"> <u><font size="3" color="navy">       Ir a Google Maps</font></u></a><br><br>
                                <div class="control-group">
                                    <div class="controls">
                                        <?php echo form_error('lon_1'); ?>
                                        <label class="control-label">Punto 1:</label>
                                        
                                        <input type="text" class="medium" name="lon_1" placeholder="Escoja su punto en Ir a Google Maps" value="<?php echo set_value('lon_1');?>"> 
                                        <b class="warning" style="font-size: 20px">&nbsp;*</b>
                                        
                                        <br>
                                        <?php echo form_error('lat_1'); ?>
                                        <label class="control-label" >Punto 2:</label>

                                        <input type="text" class="medium" name="lat_1" placeholder="Escoja su punto en Ir a Google Maps" value="<?php echo set_value('lat_1'); ?>">
                                        <b class="warning" style="font-size: 20px">&nbsp;*</b>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <div class="controls">
                                        <label class="control-label" ><b>y</b>:</label>
                                        <select class="span3" name="sec_2">
                                            <?php foreach ($listaC as $fila) { ?>
                                                <option <?php
                                            if ($fila->nombre == set_value('sec_2')) {
                                                echo 'selected';
                                            }
                                                ?>><?php echo $fila->nombre; ?> </option>
                                                <?php } ?> 
                                        </select> 
                                        <b class="warning" style="font-size: 20px">&nbsp;&nbsp;</b>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <div class="controls">
                                        <?php echo form_error('lon_2'); ?>
                                        <label class="control-label">Punto 3:</label>

                                        <input type="text" class="medium" name="lon_2" placeholder="Escoja su punto en Ir a Google Maps" value="<?php echo set_value('lon_2'); ?>">
                                        <b class="warning" style="font-size: 20px">&nbsp;*</b>
                                        <br>
                                        <?php echo form_error('lat_2'); ?>
                                        <label class="control-label">Punto 4:</label>

                                        <input type="text" class="medium" name="lat_2" placeholder="Escoja su punto en Ir a Google Maps" value="<?php echo set_value('lat_2'); ?>">
                                        <b class="warning" style="font-size: 20px">&nbsp;*</b>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <div class="controls">
                                        <label class="control-label"><b>Orientación:</b></label>
                                        <select class="span3" name="orientacion">
                                            <option>Norte</option>
                                            <option>Sur</option>
                                            <option>Este</option>
                                            <option>Oeste</option>
                                        </select> 
                                        <b class="warning" style="font-size: 20px">&nbsp;&nbsp;</b>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <div class="controls">
                                        <?php echo form_error('azules'); ?>
                                        <label class="control-label"><b>Espacios SIMERT:</b></label>
                                        <input type="text" class="input-mini" name="azules" placeholder="Cantidad" style="margin-left: -150px" >
                                        <b class="warning" style="font-size: 20px">&nbsp;*</b>
                                    </div>
                                </div>

                             
                                        <button type="submit" class="btn btn-primary">Guardar Cambios</button>  

                                   
                            </form>
                        </div>
                    </div>
                </section>     
            </div> 
        </fieldset>
    </body>
</html>
